package pl.wroc.uni.ii.puzzleWS;

import java.util.List;

import org.restlet.resource.Get;
import org.restlet.resource.Put;
import org.restlet.resource.ServerResource;

import pl.wroc.uni.ii.puzzleWS.data.Score;
import pl.wroc.uni.ii.puzzleWS.data.ScoreDao;
import pl.wroc.uni.ii.puzzleWS.data.ScoreResource;

public class ScoreServerResource extends ServerResource implements
		ScoreResource {

	@Get
	public List<Score> retrive() {
		return ScoreDao.INSTANCE.selectHighScores();
	}

	@Put
	public void store(Score score) {
		ScoreDao.INSTANCE.persist(score);
	}

}
